Merged
Conversation
BASE/src/Microsoft.ApplicationInsights/OpenTelemetryBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request fixes an issue where TrackTrace calls with SeverityLevel.Verbose (and corresponding debug-level NLog traces) were being silently dropped by the logger filter. The fix centralizes the minimum log level configuration by adding a category-specific LoggerFilterRule for the TelemetryClient logger in the WithApplicationInsights extension method, setting the minimum level to Trace.
Changes:
- Added a
LoggerFilterRuleinOpenTelemetryBuilderExtensions.WithApplicationInsights()to set minimum log level toTracefor theTelemetryClientcategory - Removed the global
MinLevel = LogLevel.Traceconfiguration fromTelemetryTestEnvironmentas it's now centralized - Updated tests to include
SeverityLevel.Verboseand adjusted assertion count from 4 to 5 - Updated example applications to demonstrate
Tracelevel logging
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| BASE/src/Microsoft.ApplicationInsights/OpenTelemetryBuilderExtensions.cs | Adds category-specific LoggerFilterRule for TelemetryClient to set minimum log level to Trace |
| LOGGING/test/NLogTarget.Tests/TelemetryTestEnvironment.cs | Removes global MinLevel configuration that's now handled centrally |
| BASE/Test/Microsoft.ApplicationInsights.Test/Microsoft.ApplicationInsights.Tests/TelemetryClientTest.cs | Adds test coverage for SeverityLevel.Verbose and updates assertion count |
| examples/NLogConsoleApp/nlog.config | Changes NLog configuration to use Trace level for Application Insights target |
| examples/NLogConsoleApp/Program.cs | Changes NLog internal logger level to Trace for demonstration |
| examples/BasicConsoleApp/Program.cs | Adds example TrackTrace call with SeverityLevel.Verbose |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
rajkumar-rangaraj
approved these changes
Feb 20, 2026
rajkumar-rangaraj
approved these changes
Feb 20, 2026
This was referenced Apr 2, 2026
Open
Closed
This was referenced Apr 6, 2026
Bump Microsoft.ApplicationInsights.WorkerService from 3.0.0 to 3.1.0
mspnp/cloud-design-patterns#473
Merged
Open
Open
Open
Open
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix bug where Debug/Trace level logs from TrackTrace API were not emitted to Application Insights
potential fix for github issue 3118.